# -*- coding:utf-8 -*-
"""
Author：Administrator
Date:2023年03月14日
"""
import openpyxl

myBook=openpyxl.load_workbook('录取表.xlsx')
mySheet=myBook['录取表']
myRange=list(mySheet.values)

myDict={}
for myRow in myRange[3:]:
	if myRow[0] in myDict.keys():
		myDict[myRow[0]]+=[myRow]
	else:
		myDict[myRow[0]]=[myRow]
print(myDict)
for myKey,myValue in myDict.items():
	myNewSheet=myBook.create_sheet(myKey+'录取表')
	myNewSheet.append(myRange[2])
	for myRow in myValue:
		myNewSheet.append(myRow)

myBook.save('结果表-录取表.xlsx')